package com.unhz.taigu.service.permission.impl;

import com.unhz.generator.dao.SysPermissionCustomMapper;
import com.unhz.generator.pojo.SysPermission;
import com.unhz.taigu.service.permission.SysPermissionCustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by cxg on 2017/11/14 0014.
 *
 * @Author 曹显贵
 * @Date 2017/11/14 0014 11:47
 */
@Service
public class SysPermissionCustomServiceImpl implements SysPermissionCustomService {
    @Autowired
    private SysPermissionCustomMapper sysPermissionCustomMapper;


    @Override
    public List<SysPermission> findMenuByUserId(Integer id) {
        return sysPermissionCustomMapper.findMenuByUserId(id);
    }

    @Override
    public List<SysPermission> findPermissionByUserId(Integer id) {
        return sysPermissionCustomMapper.findPermissionByUserId(id);
    }

    @Override
    public List<SysPermission> findPermissionByRoleId(Integer roleId) {
        return sysPermissionCustomMapper.findPermissionByRoleId(roleId);
    }

    @Override
    public List<SysPermission> findMenuByRoleId(Integer roleId) {
        return sysPermissionCustomMapper.findMenuByRoleId(roleId);
    }
}
